<template>
  <div class="hamburger" title="收起/折叠">
    <img
      :class="{ 'is-active': isActive }"
      class="menuIcon"
      src="../../assets/images/menuIcon.png"
      alt=""
      @click="toggleClick"
    />
  </div>
</template>

<script>
export default {
  name: "Hamburger",
  props: {
    isActive: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    toggleClick() {
      this.$emit("toggleClick");
    },
  },
};
</script>

<style scoped lang="scss">
.hamburger {
  height: 56px;
  width: 288px;
  cursor: pointer;
  background-color: rgba($color: #000000, $alpha: 0.1);
  transition: background 0.3s;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(5px);
  padding-left: 16px;

  display: flex;
  justify-content: flex-start;
  align-items: center;
  .menuIcon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    // padding-left: 16px;
  }
}

.is-active {
  transform: rotate(180deg);
}
</style>
